We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
版本号:3.8.0
问题描述: org.jeecgframework.poi.util.PoiExcelTempUtil工具类漏了公式了
/** * 把这N行的数据,cell重新设置下,修复因为shift的浅复制问题,导致文本不显示的错误 * * @param sheet * @param startRow * @param endRow */ public static void reset(Sheet sheet, int startRow, int endRow) { if (sheet.getWorkbook() instanceof HSSFWorkbook) { return; } for (int i = startRow; i <= endRow; i++) { Row row = sheet.getRow(i); if (row == null) { continue; } int cellNum = row.getLastCellNum(); for (int j = 0; j < cellNum; j++) { if (row.getCell(j) == null) { continue; } Map<String, Object> map = copyCell(row.getCell(j)); row.removeCell(row.getCell(j)); Cell cell = row.createCell(j); cell.setCellStyle((CellStyle) map.get("cellStyle")); if ((boolean) map.get("isDate")) { cell.setCellValue((Date) map.get("value")); } else { CellType cellType = (CellType) map.get("cellType"); switch (cellType) { case NUMERIC: cell.setCellValue((double) map.get("value")); break; case STRING: cell.setCellValue((String) map.get("value")); break; case FORMULA: // 这里是不是漏了这个 cell.setCellFormula((String) map.get("value")); break; case BLANK: break; case BOOLEAN: cell.setCellValue((boolean) map.get("value")); case ERROR: break; } } } } }
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
sq
No branches or pull requests
版本号:3.8.0
问题描述:
org.jeecgframework.poi.util.PoiExcelTempUtil工具类漏了公式了
The text was updated successfully, but these errors were encountered: